package com.aaa.member.controller;

import com.aaa.entity.CouponHistory;
import com.aaa.member.service.CouponHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @author JYH
 * @version 1.0
 * @date 2023/3/14 19:27
 */
@Api(value = "/member", tags = {"会员"})
@RestController
@RequestMapping("/member")
public class CouponHistoryF {
    @Autowired
    private CouponHistoryService couponHistoryService;
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "id", value = "", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "string", name = "date", value = "", required = true)
    })
    @ApiOperation(value = "", notes = "")
    @RequestMapping("/updateState")
    public Integer updateState(Integer id, String date){
        return couponHistoryService.updateState(id,date);
    }
}
